1. Field of the Invention
The present invention relates to a method of data interpolation, and more particularly to a method of scaling up or down of different types of data such as graphics, image, video or audio data, and for application of polygon curve fitting in many area such as object moving tracking analysis, data analysis, a finder for objects of 2D shape or 3D surface in graphic areas.
2. Description of Related Art
Scaling is useful for operations in graphics, image, video or audio application for expanding or shrinking sample resolution and for zooming. Especially in digital display devices with fixed resolution, different kinds of source image format must be scaled to fit the resolution of the digital display.
For example, a display panel may have fixed resolution of 1024×768 pixels in XGA mode, but the source image may come from computer, video decoder, or others that the input resolution varies depending on the input modes. The input source in VGA mode (640×480 pixels) with resolution less that that of display mode XGA needs to be scaled up when it is to be displayed on the XGA panel. On the other hand, an input source in SXGA mode (1280×1024 pixels) with resolution greater than that of display mode XGA needs to be scaled down when displayed on the XGA panel. Image resizing is very important for digital display devices such as LCD. Prior art provide different well-known methods, such as Bilinear, Cubic, B-Spline, Bésier have been proposed in order to achieve a good filtering effect for scaling uses.
The Bilinear method is the most commonly used method using interpolation. Its advantages are in its simplicity and cost since only two reference points are taken. As a result, the cost of the implementation of the Bilinear method is low because computation and storage requirements are less compared with other high-order interpolation methods. However the output of the Bilinear method is blurry due to lack of sharpness from the interpolation results and is, therefore, not suitable for text image. The sharpness of the picture quality depends on curve after fitting the interpolation points. The Bilinear method takes the weighting average as the interpolation result. Consider two neighboring pixels A, B, if the interpolation point C is located between A and B with distance D (D≦1) from A, then the interpolation result according to the Bilinear method isC=A(1−D)+BD  Eq. 1
Cubic or B-Spline methods are the more preferred methods used in high quality scaling system with almost perfect scaling quality, but the cost is very high for computation and storage. Cubic methods usually require 4 points f(−1), f(0), f(1), and f(2) as reference. The Cubic Curve using the Hermite Method has 1 start point P1, 1 end point P2, 1 start point tangent-vector R1, and 1 end point tangent-vector R2 by the formula
                                                                        f                ⁡                                  (                  x                  )                                            =                            ⁢                                                                    (                                                                  2                        ⁢                                                  x                          3                                                                    -                                              3                        ⁢                                                  x                          2                                                                    +                      1                                        )                                    ⁢                                      P                    1                                                  +                                                      (                                                                                            -                          2                                                ⁢                                                  x                          3                                                                    +                                              3                        ⁢                                                  x                          2                                                                                      )                                    ⁢                                      P                    2                                                  +                                                                                                      ⁢                                                                    (                                                                  x                        3                                            -                                              2                        ⁢                                                  x                          2                                                                    +                      x                                        )                                    ⁢                                      R                    1                                                  +                                                      (                                                                  x                        3                                            -                                              x                        2                                                              )                                    ⁢                                      R                    2                                                                                                          Eq        .                                  ⁢        2                                                                                                                ⁢                              =                                ⁢                                                                            (                                                                        2                          ⁢                                                      P                            1                                                                          -                                                  2                          ⁢                                                      P                            2                                                                          +                                                  R                          1                                                +                                                  R                          2                                                                    )                                        ⁢                                          x                      3                                                        +                                                                                                                      ⁢                                                                    (                                                                                            -                          3                                                ⁢                                                  P                          1                                                                    +                                              3                        ⁢                                                  P                          2                                                                    -                                              2                        ⁢                                                  R                          1                                                                    -                                              R                        2                                                              )                                    ⁢                                      x                    2                                                  +                                                      R                    1                                    ⁢                  x                                +                                  P                  1                                                                                        Eq        .                                  ⁢        3            where P1=f(0),    P2=f(1)    R1=G1(P2−P0)/2=G1[f(1)−f(−1)]/2=tangent-vector at P1    R2=G2(P3−P1)/2=G2[f(2)−f(0)]/2=tangent-vector at P2    G1, G2 are gain factors, wherein gain factor is proportional to the sharpness of the scaling result.